const { mock, Random } = require("mockjs");
const searchAdv = require('./json/sales/searchAdv.json');
const searchChatroom = require('./json/sales/searchChatroom.json');
const advDetail = require('./json/sales/advDetail.json');
const category = require('./json/sales/categoryList.json');

const obj = {
    "POST /api/sale/haoke/department": {
        code: 0,
        msg: null,
        data: {
            departmentList: ["成人学部", "高中", "初中", "小学"]
        },
        pager: {
            pageNum: 1,
            pageSize: 50,
            count: 100
        }
    },
    "POST /api/sale/haoke/channel": {
        code: 0,
        msg: null,
        data: {
            channelList: [{
                name: '直投',
                type: 1,
            }, {
                name: '商务',
                type: 1,
            }, {
                name: '问卷星',
                type: 1,
            }, {
                name: '信息流',
                type: 1,
            }, {
                name: '信息流免费课',
                type: 1,
            }, {
                name: '内部渠道',
                type: 2,
            }, {
                name: '小学带量',
                type: 2,
            }, {
                name: '合作渠道',
                type: 2,
            }]
        },
        pager: {
            pageNum: 1,
            pageSize: 50,
            count: 100
        }
    },
    "POST /api/sale/haoke/adversing/search": mock(searchAdv),
    "POST /api/sale/haoke/chatroom/search": mock(searchChatroom),
    "POST /api/sale/haoke/detail": advDetail,
    "POST /api/sale/haoke/create": {
        code: 0,
        msg: null,
        data: {
            message: "success"
        }
    },
    "POST /api/sale/haoke/updateSale": {"code":0,"data":{"id":12003},"msg":"success","pager":null},
    "POST /api/sale/haoke/chatroom/category": mock(category)
};

module.exports = obj;
